package com.csw.shuanfa.CodeImprove.designPattern.DaiLi;

//卖票接口
interface SellTickets {
    void sell();
}

//火车站 火车站具有卖票功能，所以需要实现SellTickets接口
class TrainStation implements SellTickets {
    public void sell() {
        System.out.println("火车站卖票");
    }
}

//代售点
class ProxyPoint implements SellTickets {
    private TrainStation station = new TrainStation();

    public void sell() {
        System.out.println("代理点收取一些服务费用");
        station.sell();
    }
}

//测试类
public class StaticDaiLi {
    public static void main(String[] args) {
        ProxyPoint pp = new ProxyPoint();
        pp.sell();
    }
}